// requires Windows 2000 Service Pack 4, Windows Server 2003, Windows XP Service Pack 2
// requires  KB959209
// http://download.microsoft.com/download/c/6/e/c6e88215-0178-4c6c-b5f3-158ff77b1f38/NetFx20SP2_x86.exe

[CustomMessages]
dotnetfx20sp2_title=.NET Framework 2.0 Service Pack 2

en.dotnetfx20sp2_size=23.8 MB
sl.dotnetfx20sp2_size=23,8 MB


[Run]
Filename: "{ini:{tmp}{\}dep.ini,install,dotnetfx20sp2}"; Description: "{cm:dotnetfx20sp2_title}"; StatusMsg: "{cm:depinstall_status,{cm:dotnetfx20sp2_title}}"; Parameters: "/q:a /t:{tmp}{\}dotnetfx20sp2 /c:""install /q /l /msipassthru MSI_PROP_BEGIN"" REBOOT=Suppress ""MSI_PROP_END"""; Flags: skipifdoesntexist

[Code]	
const
	dotnetfx20sp2_url = 'http://download.microsoft.com/download/c/6/e/c6e88215-0178-4c6c-b5f3-158ff77b1f38/NetFx20SP2_x86.exe';

procedure dotnetfx20sp2();
var
	version: cardinal;
begin
	RegQueryDWordValue(HKLM, 'Software\Microsoft\NET Framework Setup\NDP\v2.0.50727', 'SP', version);
	if IntToStr(version) < '1' then
		InstallPackage('dotnetfx20sp2', 'dotnetfx20sp2.exe', CustomMessage('dotnetfx20sp2_title'), CustomMessage('dotnetfx20sp2_size'), dotnetfx20sp2_url);
end;
